#include "../../client/rpc_client.hpp"
void cb(const std::string &tname, const std::string &msg)
{
    ILOG("收到了%s主题的%s信息",tname.c_str(),msg.c_str());
}
int main()
{
    BRpc::Client::TopicClient client("127.0.0.1",9090);
    client.create("world");
    client.subscribe("happy",cb);
    sleep(20);
    for(int i=0;i<10;i++)
    {
        DLOG("发送信息");
        client.publish("world","world-"+std::to_string(i));
    }
    return 0;
}